<div id="content">
    <h1>GC</h1>
    <h2>Alunos</h2>
    <table border="1">
        <thead>
            <tr>
                <th>Id</th>
                <th>Nome</th>
                <th>Turma</th>

                <?php foreach ($gc_disciplinas as $gc_disciplina): ?>
                    <th><?php echo $gc_disciplina->getNome(); ?></th>
                <?php endforeach ?>

            </tr>
        </thead>
        <tbody>


            <?php foreach ($gc_alunos as $i => $gc_aluno): ?>
                <tr>

                    <td><?php echo link_to($gc_aluno->getId(), 'alunos_edit', $gc_aluno); ?></td>
                    <td><?php echo $gc_aluno->getNome() ?></td>
                    <td><?php echo link_to($gc_aluno->getGcTurmaDisciplinas()->getTurma()->getNumero() , 'turmas_edit', $gc_aluno->$gc_aluno->getGcTurmaDisciplinas()->getTurma()) ?></td>

                    <?php foreach ($gc_disciplinas as $gc_disciplina): ?>
                        <td> 
                            <?php echo $gc_aluno->verificarDisciplina($gc_disciplina->getNome()) ? "<a href=" . url_for('aluno_disciplina_edit', $gc_aluno->pegarAlunoDisciplina($gc_disciplina)) . " class='myButton'>" . $gc_aluno->pegarMedia($gc_disciplina->getNome()) . "</a>" : '-' ?>
                        </td>


                    <?php endforeach ?>

                </tr>

            <?php endforeach ?>
        </tbody>
    </table>

    <a href="<?php echo url_for('alunos_new') ?>">Adicionar Aluno</a>

    <a href="<?php echo url_for('disciplinas') ?>">Lista de Disciplinas</a>
    
    <a href="<?php echo url_for('professores') ?>">Lista de Professores</a>
    
    <br/>
    
    <a href="<?php echo url_for('turmas') ?>">Lista de Turma</a>
</div>